The Common component is a collection of generic type definitions and functions, that is, definitions and functions that are needed by many of the other OPF components.
Common component Overview
The Common component contains no classes and no methods. The Common component is not intended to be extended.
Directory
FWCommon
Common component classes
There are no classes in the Common component.
Additional Common component interfaces
The following constants are defined in FWStdDef.h:
• FALSE denotes a constant value 0.
• NULL denotes a constant value 0.
• TRUE denotes a constant value 1.
The following named types are defined in FWStdDef.h:
• FW_Boolean denotes a type used for OPF Boolean values.
• FW_PlatformHandle denotes a type used to represent OPF handles. This type corresponds to the platform-specific handle type.
• FW_ResourceId denotes a type used to represent the resource identifier for OPF resources. This type corresponds to the platform-specific resource identifier.
• FW_ResourceType denotes a type used to represent the type identifier for OPF resources. This type corresponds to the platform-specific type identifier.
The following function templates are defined in FWMath.h:
• FW_Absolute denotes a function template for taking the absolute value of some numeric type, tType, where tType is a template parameter.
• FW_Maximum denotes a function template for computing the maximum of two values a and b. The two values can be of any type, tType, where tType is a template parameter; however, they must be of the same type and the type must support the '<' operator.
• FW_Minimuim denotes a function template for computing the minimum of two values a and b. The two values can be of any type, tType, where tType is a template parameter; however, they must be of the same type and the type must support the '<' operator.
The following functions are defined in FWPriStr.h:
• FW_PrimitiveStringCopy denotes a function that copies from a string source to a string destination, and returns the string source.
• FW_PrimitiveStringEqual denotes a function that compares one string to another string. Returns TRUE if the two strings are equal and FALSE if they are not.
• FW_PrimitiveStringFindCharacter denotes a function that returns a pointer to the first occurrence of a specified character in a string source and NULL if the character is not present.
• FW_PrimitiveStringLength denotes a function that returns the length of a string. The string is assumed to be non-NULL.
The following primitive memory operations are defined in FWPriMem.h:
• FW_PrimitiveAllocateBlock denotes a function that allocates a block of memory and returns a pointer to that block of memory, if the allocate block request could be satisfied, and NULL if it could not. This is a low-level method; use the FW_CMemoryManager::Allocate–Block method instead.
• FW_PrimitiveCopyMemory denotes a function that copies a block of memory pointed to by a source to the block of memory pointed to by a destination. This is a low-level method; use the FW_CMemoryManager::–CopyMemory method instead.
• FW_PrimitiveFreeBlock denotes a function that frees a block of memory that was allocated by FW_PrimitiveAllocateBlock. This is a low-level method; use the FW_CMemoryManager::FreeBlock method instead.
• FW_PrimitiveGetBlockSize denotes a function that gets the size of a block of memory and returns the block size in bytes. This is a low-level method; use the FW_CMemoryManager::GetBlockSize method instead.
• FW_PrimitiveResizeBlock denotes a function that resizes a block of memory and returns a pointer to that block of memory, if the resize block request could be satisfied, and NULL if it could not. The block can be moved to satisfy the request. This is a low-level method; use the FW_CMemoryManager::ResizeBlock method instead.
Component dependencies
The Common component is entirely self-contained and is not dependent on any other OPF components.